import request from '@/utils/request'

export default {

    getBlogList(page,limit,blogQuery){
        return request({
            url:`/blogservice/blogfront/getBlogFrontList/${page}/${limit}`,
            method:'post',
            data:blogQuery
        })
    },
    getAllSubject(){
        return request({
            url:`/blogservice/blogsubject/getAllSubject`,
            method:'get'
        })
    },
    getHotAuthor(){
        return request({
            url:`/blogservice/blog/getHotAuthor`,
            method:'get'
        })
    },
    getFrontBlogInfo(blogId){
        return request({
            url:`blogservice/blog/getFrontBlogInfo/${blogId}`,
            method:'get'
        })
    },
    getAuthorCount(authorId){
        return request({
            url:`blogservice/blog/getAuthorCount/${authorId}`,
            method:'get'
        })
    },
    blogsupport(supportinfo){
        return request({
            url:`blogservice/support/supportblog`,
            method:'post',
            data:supportinfo
        })
    },
    delsupport(supportinfo){
        return request({
            url:`blogservice/support/delsupport`,
            method:'delete',
            data:supportinfo
        })
    },
    supportor(supportinfo){
        return request({
            url:`blogservice/support/supportor`,
            method:'post',
            data:supportinfo
        })
    },

    supportadd(blogId){
        return request({
            url:`blogservice/blog/addSupportCount/${blogId}`,
            method:'post'
        })
    },
    collectionUpdate(blogId){
        return request({
            url:`blogservice/blog/collectionUpdate/${blogId}`,
            method:'post'
        })
    },
    blogcollection(supportinfo){
        return request({
            url:`blogservice/collection/collectionblog`,
            method:'post',
            data:supportinfo
        })
    },
    delcollection(supportinfo){
        return request({
            url:`blogservice/collection/delcollection`,
            method:'delete',
            data:supportinfo
        })
    },
    collectionor(supportinfo){
        return request({
            url:`blogservice/collection/collectionor`,
            method:'post',
            data:supportinfo
        })
    },
    addlook(blogId){
        return request({
            url:`blogservice/blogfront/addlook/${blogId}`,
            method:'post'
        })
    },
    getCommentlist(blogId){
        return request({
            url:`blogservice/comment/getComment/${blogId}`,
            method:'get'
        })
    },
    addComment(comment){
        return request({
            url:`blogservice/comment/addComment`,
            method:'post',
            data:comment
        })
    },
    deleteComment(id){
        return request({
            url:`blogservice/comment/deleteComment/${id}`,
            method:'delete'
        })
    },

    commentsupport(commentsupportinfo){
        return request({
            url:`blogservice/commentSupport/supportblog`,
            method:'post',
            data:commentsupportinfo
        })
    },
    delcommentsupport(commentsupportinfo){
        return request({
            url:`blogservice/commentSupport/delsupport`,
            method:'delete',
            data:commentsupportinfo
        })
    },
    commentsupportor(commentsupportinfo){
        return request({
            url:`blogservice/commentSupport/supportor`,
            method:'post',
            data:commentsupportinfo
        })
    },
    updateSupportCount(commentid){
        return request({
            url:`blogservice/commentSupport/updateSupportCount/${commentid}`,
            method:'post'
        })
    },
    getCommentInfo(id){
        return request({
            url:`blogservice/comment/getCommentInfo/${id}`,
            method:'get'
        })
    }
}